package com.dongdongshop.controller;


import com.dongdongshop.data.HttpResponseEnum;
import com.dongdongshop.data.Result;
import com.dongdongshop.pojo.user.TbUser;
import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {

    @RequestMapping({"/","index"})
    public String index(){
        return "index";
    }

    @RequestMapping("homeIndex")
    public String homeIndex(Model model){
        TbUser user =(TbUser) SecurityUtils.getSubject().getPrincipal();
        model.addAttribute("user",user);
        return "home-index";
    }
}
